<template>
  <!-- 顶部通栏 -->
  <AppNavBar></AppNavBar>
  <!-- 头部组件 -->
  <AppHeader></AppHeader>
    <!-- 吸顶头部组件 -->
  <AppHeaderSticky></AppHeaderSticky>
  <!-- 内容容器 -->
  <div class="app-body">
  <!-- 二级路由 -->
    <RouterView/>
  </div>
  <!-- 底部组件 -->
  <AppFooter></AppFooter>

</template>

<script>
// 导入顶部通栏
import AppNavBar from '@/components/app-navbar.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import AppHeaderSticky from '@/components/app-header-sticky.vue'
import { useStore } from 'vuex'
export default {
  name: 'LayOut',
  components: { AppNavBar, AppHeader, AppFooter, AppHeaderSticky },
  // 获取分类数据
  setup () {
    const store = useStore()
    store.dispatch('category/getCategory')
  }
}
</script>

<style lang="less" scoped>
.app-body{
  min-height: 600px;
}
</style>
